<?php
/**
 * User: xudongsheng
 * Date: 2017/9/10
 * Time: 上午12:10
 */

namespace app\admin\validate;
use think\Validate;

class Cloumn extends Validate
{
    protected $rule     =   [
            'name|模型名'  =>  'require|max:30|min:1|token',
            'tablename|操作表'  =>  'require|max:30|min:1',
            'sort|排序'       =>  'require|number',
            'description|简介'=>  'max:250',
            'status|状态'     =>  'require|number'
    ];
    protected $message  =   [

    ];

    protected $scene    =   [
            'modelAddEdit'    =>  ['name','tablename','sort','description','status'],
            'columnAddEdit'   =>  [
                'name|栏目名'            => 'require|max:30|min:1|token',
                'pid|父栏目'             =>  'require|number',
                'model_id|内容模型'      =>  'require|number',
                'alias'                 =>  'require',
                'keywords'              =>  'max:250',
                'sort','description','status'],
    ];
}